<?php if ($this->pageCount > 1):
        $search_url = (isset ($_GET['search'])) ? '?search='.$_GET['search'] : '';
        ?>
<div class="page-navigator">


<?php if (isset($this->previous)): ?>
  <a href="<?php echo ($this->previous > 1) ? ('/page/'. $this->previous.$search_url) : ('/'. $search_url) ?>">
    ←&nbsp;сюда
  </a>
<?php else: ?>
  <span class="disabled">←&nbsp;сюда</span>
<?php endif; ?>


<?php $i=0; foreach ($this->pagesInRange as $page){ ?>

  <?php if ($page != $this->current){ ?>
  <span class="page-cel">
    <a href="<?php echo (!empty ($i)) ? ('/page/'. $page.$search_url) : '/'.$search_url ?>">
        <?php echo $page; ?>
    </a>
  </span>
  <?php }else{ ?>
    <?php echo '<span style="color: #000; font-weight: bold" class="page-cel">'.$page."</span>" ?>
  <?php } ?>
<?php $i++; } ?>

<?php if (isset($this->next)): ?>
  <a href="<?php echo '/page/'. $this->next .$search_url?>">
    туда
  </a> →
<?php else: ?>
  <span class="disabled">туда →</span>
<?php endif; ?>

 
</div>
<?php endif; ?>